@using umbraco.MacroEngines
@inherits DynamicNodeContext
@{
    var pages = @Model.Parent.Descendants("Photo").Where("Id != " + @Model.Id).Take(3);
    <ul class="thumbnails">
    @foreach (var item in pages)
    {
        var image = RenderPage("ResizeImage.cshtml", item.BodyImage.ToString(), "260", "180", "", "ffffff");
        <li class="span3">
            <a href="@item.Url" title="@item.HeaderText" class="thumbnail">@image</a>
        </li>
    }
    </ul>
}